10 CLEAR500
60 V=22:W=22:G=16
70 DIM D$(63),R$(63),O$(W),V$(V),L(G),C(G),F(W),SV(311)
80 GOSUB 1820:RM=0
90 CLS
100 PRINT"THE DEMON'S EYE"
110 PRINT"---------------"
111 PRINT" AN ADVENTURE"
112 PRINT"      BY"
113 PRINT"  JOHN DUECK":PRINT
114 PRINT" MC-10 VERSION"
115 PRINT" BY JIM GERRIE"
120 REM
130 PRINT
140 PRINT"LOCATION:":C1=1:CC=32
141 IFMID$(D$(RM),CC,1)<>""ANDMID$(D$(RM),CC,1)<>" "THENCC=CC-1:GOTO141
150 PRINTMID$(D$(RM),C1,CC-C1):C1=CC+1:CC=C1+31:IFC1<LEN(D$(RM))THEN141
160 PRINT"EXITS: ";
170 FORI=1TOLEN(R$(RM))
180 PRINTMID$(R$(RM),I,1);", ";
190 NEXT:PRINTCHR$(8);CHR$(8);
200 PRINT
210 FORI=1TOG
220 IFL(I)=RMANDF(I)<>1THENPRINT"I SEE ";O$(I);" HERE"
230 NEXT
240 GOSUB655:PRINT
250 M$="WHAT?"
260 REM
270 PRINT"WHAT NOW";
280 INPUT Q$
290 V$=""
300 W$=""
310 FORI=1TOLEN(Q$)
320 IFMID$(Q$,I,1)=" "ANDV$=""THENV$=LEFT$(Q$,I-1)
330 IFMID$(Q$,I+1,1)<>" "ANDV$<>""THENW$=MID$(Q$,I+1,LEN(Q$)-1):I=LEN(Q$)
340 NEXT
350 IFW$=""THENV$=Q$
360 REM
370 VB=0
380 FORI=1TOV
390 IFV$=V$(I)THENVB=I
400 NEXT
410 OB=0
420 FORI=1TOW
430 IFW$=O$(I)THENOB=I
440 NEXT
450 IFW$>""ANDOB=0THEN M$="NO CAN DO!"
460 IFVB=0THENVB=V+1
470 IFW$=""THENM$="I NEED TWO WORDS!"
480 IFVB>VANDOB>0THENM$="SORRY-I WON'T "+Q$+"!"
490 IFVB>VANDOB=0THENM$="THAT'S NONSENSE!"
500 IFVB<VANDOB>0ANDOB<=GTHENIFC(OB)<>1THENM$="I DON'T HAVE "+O$(OB)
510 REM
520 IF(RM>60ANDRM<64ANDF(7)<2)OR(((RM+1)/8=INT((RM+1)/8))ANDF(7)<2)OR(RM>0ANDRM<8ANDF(7)<2)THEN522
521 GOTO530
522 M$="TOO DARK!":GOTO120
530 IFRM=2ANDC(4)<>1THEN532
531 GOTO540
532 PRINT"THE PIRATE EYES ME AND SAYS..."
533 PRINT"'WHERE'S YOUR RING? NO RUBY"
534 PRINT"RING?!? YOU SHALL NOT PASS!'"
535 PRINT"AND WITH THAT HE REACHES OUT A"
536 PRINT"SURPRISINGLY SUBSTANTIAL HAND"
537 PRINT"AND SNAPS MY NECK.":GOTO580
540 IFRM=0ANDC(5)=1THEN542
541 GOTO560
542 PRINT"I HAVE ESCAPED THE PIRATE'S   "
543 PRINT"CAVE WITH THE FABLED DEMON'S"
544 PRINT"EYE RUBY! I GO DOWN IN HISTORY"
545 PRINT"AS ONE OF THE GREATEST TREASURE"
546 PRINT"HUNTERS EVER! CONGRATULATIONS,"
547 PRINT"YOU MADE ME WIN!":GOTO580
560 ON VB GOSUB 630,660,740,740,740,740,740,740,740,960,960,1050,1140,1170,1210,1270,1140,1340,1370,1520,1680,1730
570 GOTO120
580 REM
590 GOSUB1730
600 GOSUB655
610 PRINT"GAME OVER."
620 END
630 REM
640 M$="HEY! YOU GOT ME INTO THIS, YOU GET ME OUT!"
650 RETURN
655 C1=1:CC=32
656 IFMID$(M$,CC,1)<>""ANDMID$(M$,CC,1)<>" "THENCC=CC-1:GOTO656
657 PRINTMID$(M$,C1,CC-C1):C1=CC+1:CC=C1+31:IFC1<LEN(M$)THEN656
658 RETURN
660 REM
670 PRINT"I AM CARRYING:"
680 I$="":M$="NOTHING.":FORI=1TOG
690 IFC(I)>0THENI$=I$+O$(I)+", "
700 NEXT:IFI$<>""THENM$=LEFT$(I$,LEN(I$)-2)
710 GOSUB655:M$=""
720 PRINT
730 RETURN
740 REM
750 D=0
760 IFOB=0THEND=VB-3
770 IFOB>16THEND=OB-16
780 IFRM=18ANDD=6THEND=2
790 IFRM=26ANDD=5THEND=1
800 R$(18)="SW":R$(26)="NS"
810 F(W)=0:RL=LEN(R$(RM))
820 FORI=1TORL
830 U$=MID$(R$(RM),I,1)
840 IF(U$="N"ANDD=1ANDF(W)=0)THENRM=RM-8:F(W)=1
850 IF(U$="S"ANDD=2ANDF(W)=0)THENRM=RM+8:F(W)=1
860 IF(U$="W"ANDD=3ANDF(W)=0)THENRM=RM-1:F(W)=1
870 IF(U$="E"ANDD=4ANDF(W)=0)THENRM=RM+1:F(W)=1
880 NEXT
890 M$="OK":R$(18)="WD":R$(26)="SU"
900 IFF(W)=0THENM$="CAN'T GO THAT DIRECTION!"
910 IFD<1 THEN M$="GO WHERE?"
920 IFRM=32ANDD=2THENM$="THE CAVERN WALL BEHIND YOU SOLIDIFIES WITH A MYSTERIOUS CHUCKLE!"
930 IFRM=61ANDD=4THENM$="THE BOULDER ROLLS BACK IN PLACE!":F(17)=0
940 IFRM=2THEN942
941 GOTO950
942 M$="THE PIRATE EYES ME AND SAYS... 'YOU ARE A WISE SCOUNDREL, "
943 M$=M$+"FOR WITH A RUBY RING YOU CAN SAFELY PASS ME STING AND GET THE REAL RUBY.'"
950 RETURN
960 REM
970 IFOB=0THENRETURN
980 IFC(OB)=1THENM$="I HAVE IT ALREADY!":RETURN
990 IFOB>16THENRETURN
1000 IFOB>9THENM$="I CAN'T TAKE THAT!":RETURN
1010 IFL(OB)<>RMORF(OB)=1THENM$="I DON'T SEE A "+O$(OB)+" HERE!":RETURN
1020 IFOB=2ANDRM=36ANDF(8)<2ANDL(8)<>36THEN1022
1021 GOTO1030
1022 PRINT"A SMALL SQUARE OF ROCK WHERE"
1023 PRINT"THE BAG RESTED POPS UP AND THE"
1024 PRINT"THE CIELING CAVES IN WITH A"
1025 PRINT"RESOUNDING CRASH. ONE OF THE"
1026 PRINT"STALACTITES IMPALES ME.":GOTO580
1030 C(OB)=1:L(OB)=65:M$="I'VE GOT IT."
1040 RETURN
1050 REM
1060 M$="NOTHING SPECIAL FOR A "+W$
1070 IFRM=36ANDOB=2THENM$="I SEE A SMALL SQUARE TRACING IN THE STONE AROUND THE COINS."
1080 IFRM=60ANDOB=11THENM$="IT LOOKS LIKE I MIGHT BE ABLE TO MOVE IT."
1090 IFRM=50ANDOB=12THENM$="I DISCOVER A BEAUTIFUL PEARL NECKLACE HIDDEN WITHIN THE RUBBLE!":F(1)=0
1100 IFRM=37ANDOB=13THENM$="ONE BEARS THE INSCRIPTION 'LIKE A ROLLING STONE'. FUNNY BOB WAS AROUND IN THE 1600'S, EH?"
1110 IFRM=34ANDOB=14THEN1112
1111 GOTO1120
1112 M$="ON ONE OF THE BONY FINGERS ON ITS TIGHTLY CLENCHED HANDS I SEE THE BLOODY GLINT OF A RUBY RING!":F(4)=0
1120 IFRM=1ANDOB=16THEN1122
1121 GOTO1130
1122 M$="I GASP AS I NOTICE ONE OF THE EYES ON THE DEMON WATCHING ME--IT'S A RUBY THE SIZE OF MY FIST!"
1123 M$=M$+" THIS IS THE DEMON'S EYE!":F(5)=0
1130 RETURN
1140 REM
1150 IFRM=30ANDF(16)=0ANDC(9)=1THEN1152
1151 GOTO1160
1152 M$="THE KEY TURNS RELUCTANTLY IN THE RUSTY LOCK AND THE DOOR SWINGS OPEN.":F(16)=2:R$(30)="SW"
1160 RETURN
1170 REM
1180 IFC(6)=0THENM$="NOTHING TO LIGHT IT WITH."
1190 IFOB=7ANDC(7)=1ANDC(6)=1THENM$="THE ANCIENT BRASS LANTERN LIGHTS SPUTTERINGLY.":F(7)=2
1200 RETURN
1210 REM
1220 IFOB<>8THEN1270
1230 IFC(8)=0THENM$="I DON'T HAVE IT.":RETURN
1240 M$="IT FALLS OVER AND I PICK IT UP AGAIN."
1250 IFRM=36THENM$="IT FITS UNDER ONE OF THE STALACTITES AND FORMS A PILLAR SUPPORTING THE CEILING.":F(8)=2:C(8)=0:L=36
1260 RETURN
1270 REM
1280 IFC(OB)=0THENM$="I DON'T HAVE IT.":RETURN
1290 M$="DONE."
1300 IFOB=7THENM$="AS I DROP IT, THE LIGHT SNUFFS OUT.":F(7)=0
1310 C(OB)=0
1320 L(OB)=RM
1330 RETURN
1340 REM
1350 IFRM=60ANDOB=11ANDF(11)=0THEN1352
1351 GOTO1360
1352 M$="MY MUSCLES STRAIN TO THEIR LIMIT, BUT WITH A FINAL GROAN I MANAGE TO ROLL THE "
1353 M$=M$+"BOULDER AWAY TO REVEAL A ROUND BLACK HOLE."
1354 R$(60)="WE":F(11)=2
1360 RETURN
1370 REM
1380 PRINT"PLEASE WAIT... ";
1390 CC=1:SV(SC)=RM:CC=CC+1
1400 FORI=1TOG
1410 SV(CC)=L(I):CC=CC+1:SV(CC)=C(I):CC=CC+1
1420 NEXT
1430 FORI=1TOW
1440 SV(CC)=F(I):CC=CC+1
1450 NEXT
1460 FORI=0TO63
1470 FORC1=1TO4:I$=MID$(R$(I),C1,1):IFI$<>""THENSV(CC)=ASC(I$):CC=CC+1:GOTO1480
1475 SV(CC)=0:CC=CC+1
1480 NEXT:NEXT:INPUT"HIT play & recordAND THEN enter TO SAVE";I$
1490 SAVE*SV,"DEMONDAT"
1500 M$="SAVED."
1510 RETURN
1520 REM
1530 INPUT"HIT enter AND PRESS play";I$:LOAD*SV,"DEMONDAT"
1540 CC=1:RM=SV(SC):CC=CC+1
1550 FORI=1TOG
1560 L(I)=SV(CC):CC=CC+1:C(I)=SV(CC):CC=CC+1
1570 NEXT
1580 FORI=1TOW
1590 F(I)=SV(CC):CC=CC+1
1600 NEXT
1610 FORI=0TO63
1620 R$(I)="":FORC1=1TO4:IFSV(CC)<>0THENR$(I)=R$(I)+CHR$(SV(CC))
1625 CC=CC+1
1630 NEXT:NEXT
1650 M$="HERE I AM AGAIN!"
1660 RETURN
1680 REM
1690 INPUT"ARE YOU SURE YOU WANT TO QUIT";Q$
1700 IFQ$="Y"THEN580
1710 M$="OK"
1720 RETURN
1730 REM
1740 SC=0
1750 IFC(1)=1THENSC=SC+5
1760 IFC(2)=1THENSC=SC+10
1770 IFC(3)=1THENSC=SC+2
1780 IFC(4)=1THENSC=SC+5
1790 IFC(5)=1THENSC=SC+18
1800 M$="YOUR SCORE IS"+STR$(SC)+" OUT OF A POSSIBLE 40."
1810 RETURN
1820 REM
1830 FORI=0TO63
1840 READD$(I)
1850 NEXT
1860 FORI=0TO63
1870 READR$(I)
1880 NEXT
1890 FORI=1TOW
1900 READO$(I)
1910 NEXT
1920 FORI=1TOV
1930 READV$(I)
1940 NEXT
1950 FORI=1TOG
1960 READL(I)
1970 NEXT
1980 FORI=1TOW
1990 READF(I)
2000 NEXT
2010 RETURN
2020 REM
2030 DATA BEACH NEXT TO CLIFFS,ROOM WITH DEMON STATUES,FROZEN ROOM,FREEZING NARROW BLACK CORRIDOR
2040 DATA FREEZING NARROW BLACK CORRIDOR,CHILLY NARROW BLACK CORRIDOR,CHILLY NARROW BLACK CORRIDOR,CHILLY NARROW BLACK CORRIDOR
2050 DATA BEACH,DARK ALCOVE,NARROW PASSAGEWAY,DAMP PASSAGE
2060 DATA ROOM WITH WATER-COVERED FLOOR,DAMP PASSAGE,GLOOMY CORNER,COOL NARROW BLACK CORRIDOR
2070 DATA BEACH COVERED WITH SHELLS AND SEAWEED,HALL SMELLING OF DEATH,DUSTY WORN STAIRS,DAMP PASSAGE
2080 DATA PIT FILLED WITH WATER,ROOM WITH CAVE DRAWINGS,COLD ROOM,COOL NARROW BLACK CORRIDOR
2090 DATA MOUTH OF CAVE,DIM PATH,MAUSOLEUM ENTRANCE,DAMP PASSAGE
2100 DATA DAMP ROOM,ARMORY COVERED WITH WEAPONS,ROOM WITH CRUMBLY DRY MOSS,NARROW BLACK CORRIDOR
2110 DATA CAVERN ENTRANCE,POOL OF LIGHT,MAUSOLEUM,DAMP PASSAGE
2120 DATA LOW ROOM WITH STALACTITES,ROOM WITH DARK STATUES,MOSSY WALLS,NARROW BLACK CORRIDOR
2130 DATA GLOOMY HALL,THIN PATH,THIN PATH,ROUNDED CORRIDOR
2140 DATA SLOPING CORRIDOR,SLOPING CORRIDOR,HIGH CORNER ABOVE WALL,NARROW BLACK CORRIDOR
2150 DATA DEPRESSION IN GROUND,THIN PATH,CORNER STREWN WITH RUBBLE,ROUNDED CORRIDOR
2160 DATA COBWEBBY ROOM,FALLEN PEBBLES,CRUMBLING WALL,NARROW BLACK CORRIDOR
2170 DATA HALL WITH DRIPPING STALACTITES,VAULTED HALL,VAULTED HALL,VAULTED HALL
2180 DATA VAULTED HALL,NARROW BLACK CORRIDOR,NARROW BLACK CORRIDOR,NARROW BLACK CORRIDOR
2190 REM
2200 DATA S,WE,WE,WE,WE,WE,WE,WS
2210 DATA NS,SE,WE,SWE,SWE,WE,SW,NS
2220 DATA NS,NSE,WD,NS,,E,NW,NS
2230 DATA NS,NS,SU,NSE,NSW,E,S,NS
2240 DATA S,NS,N,NS,NE,WE,NW,NS
2250 DATA NS,NSE,WE,NSWE,WE,WE,SW,NS
2260 DATA NS,NE,W,NS,E,WE,NW,NS
2270 DATA NE,WE,WE,NWE,W,E,WE,NW
2280 REM
2290 DATA NECKLACE,COINS,GOBLET,RING,RUBY,FLINT,LANTERN,LOG,KEY
2300 DATA DOOR,BOULDER,RUBBLE,STATUES,SKELETON,GHOST PIRATE,STATUE,NORTH,SOUTH
2310 DATA WEST,EAST,UP,DOWN
2320 REM
2330 DATA HELP,INVENTORY,GO,N,S,W,E,U,D,GET,TAKE,EXAMINE,OPEN,LIGHT,PUT,DROP,UNLOCK,ROLL,SAVE,LOAD,QUIT,SCORE
2340 REM
2350 DATA 50,36,52,34,1,48,29,21,34,30,60,50,37,34,2,1
2360 REM
2370 DATA 1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
